package club.caihappy.store.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * 文件路径上传映射
 * Created by DELL on 2022/3/13
 **/
@Configuration
public class fileUploadInterceptorConfigurer implements WebMvcConfigurer {
    //将访问路径/upload/**映射到本地路径E:/upload/
    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        registry.addResourceHandler("/upload/**").addResourceLocations("file:E:/upload/");

    }
}
